package com.xiaoshuidi.cloud.module.contract.convert.contract;

import java.util.*;

import com.xiaoshuidi.cloud.framework.common.pojo.PageResult;

import com.xiaoshuidi.cloud.module.contract.controller.admin.bill.vo.orderFees.OrderFeesVo;
import com.xiaoshuidi.cloud.module.contract.controller.admin.bill.vo.rentOrder.RentOrderVO;
import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.customerCompany.CustomerCompanyRespVO;
import com.xiaoshuidi.cloud.module.contract.dal.dataobject.contract.*;
import com.xiaoshuidi.cloud.module.contract.vo.*;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;
import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.*;

/**
 * 租客合同 Convert
 *
 * @author 合房租赁
 */
@Mapper
public interface ContractConvert {

    ContractConvert INSTANCE = Mappers.getMapper(ContractConvert.class);

    /**
     * 20230729, apartmentId与deptId一致
     */
    @Mapping(target = "deptId", source = "apartmentId")
    ContractRoomDO convert(ContractCreateReqVO bean);

    ContractRoomDO convert(ContractUpdateReqVO bean);

    ContractRoomDO convert(ApproveReqVO bean);

    ContractRespVO convert(ContractRoomDO bean);

    ContractConfigDO convert(ContractConfigReqVO bean);

    ContractConfigReqVO convert(ContractConfigDO bean);

    RoomContractRespVO convert1(ContractRoomDO bean);

    ContractRoomReqVO convert3(ContractRoomDO  bean);

    @Mapping(target = "renewTime", source = "createTime")
    RoomContractListVO convert2(ContractRoomDO bean);

    List<ContractRespVO> convertList(List<ContractRoomDO> list);

    PageResult<ContractRespVO> convertPage(PageResult<ContractRoomDO> page);

    List<ContractExcelVO> convertList02(List<ContractRoomDO> list);

    @Mapping(target = "renewTime", source = "createTime")
    List<RoomContractListVO> convertList03(List<ContractRoomDO> list);

    List<RoomContractListVO> convertList04(List<RoomContractStatusDO> list);

    List<RoomContractListVO> convertList05(List<ContractRoomDO> list);

    List<ContractExtrasDataDO> convertFeeList(List<OrderFeesVo> list);

    List<ContractTenantInformationRepVO> convertList06(List<ContractRoomDO> list);
    List<ContractRoomRespVO> convertList01(List<ContractRoomDO>  bean);

    List<ContractRoomReqVO> convertList07(List<ContractRoomDO>  bean);

    //@Mapping(target = "contractId", source = "id")
    RentOrderVO convertToRentOrder(ContractRoomDO contractRoomDO);

    RentOrderVO convertToRentOrder(ContractCreateReqVO createReqVO);

    RentOrderVO convertToRentOrder(ContractRenewalReqVO createReqVO);

    RentOrderVO convertToRentOrder(ContractExchangeReqVO reqVO);

    //@Mapping(target = "contractId", source = "id")
    ContractCreateReqVO convert(ContractRenewalReqVO reqVO);

    ContractCreateReqVO convert(ContractExchangeReqVO reqVO);

    ContractRoomDO convert(ContractFoundationReqVO reqVO);

    ContractRoomDO convert(ContractInformationReqVO reqVO);

    CompanyInfoVO convert11(CustomerCompanyRespVO companyRespVO);

    ContractRefundReqVO convertRefund(ContractExchangeReqVO reqVO);

    ContractRoomDO convert(ContractUpdateStatusVO reqVO);

    ContractUpdateStatusVO convertToUpdateStatus(ApproveReqVO reqVO);

    RoomContractApiRespVO convertResp2ApiResp(RoomContractRespVO bean);

    RoomContractApiRespVO convertRoomDo2ApiResp(ContractRoomDO bean);

    List<RoomContractApiRespVO> convertList08(List<ContractRoomDO> l);

    ContractRoomRespVO convertDo2ContractRoomResp(ContractRoomDO bean);
}
